package com.hiultra.archive.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.hiultra.common.annotation.Excel;
import com.hiultra.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;
import java.util.List;

/**
 * 借阅对象 arc_borrow
 * 
 * @author ls
 * @date 2022-07-28
 */
public class ArcBorrow extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    public static final int STATUS_PART_RETURN = 4;
    public static final int STATUS_ALL_RETURN = 5;

    /** 主键ID */
    private Long borrowId;

    /** 借阅单号 */
    @Excel(name = "借阅单号")
    private String borrowNumber;

    /** 用户Id */
    @Excel(name = "用户Id")
    private Long borrowUserId;

    /** 用户昵称 */
    @Excel(name = "用户昵称")
    private String userName;

    /** 借阅目的 */
    @Excel(name = "借阅目的")
    private String borrowReason;

    /** 申请日期 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "申请日期", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date planBorrowDate;

    /** 预计归还日期 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "预计归还日期", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date planBackDate;

    /** 0-正常,1-删除 */
    private Integer delflag;

    /** 0待审批,1审批通过,2审批未通过,3借阅中,4部分归还,5全部归还 */
    @Excel(name = "0待审批,1审批通过,2审批未通过,3借阅中,4部分归还,5全部归还")
    private Integer status;

    /** 借阅详情信息 */
    private List<ArcBorrowDetails> arcBorrowDetailsList;

    public void setBorrowId(Long borrowId)
    {
        this.borrowId = borrowId;
    }

    public Long getBorrowId() 
    {
        return borrowId;
    }
    public void setBorrowNumber(String borrowNumber) 
    {
        this.borrowNumber = borrowNumber;
    }

    public String getBorrowNumber() 
    {
        return borrowNumber;
    }
    public void setBorrowUserId(Long borrowUserId) 
    {
        this.borrowUserId = borrowUserId;
    }

    public Long getBorrowUserId() 
    {
        return borrowUserId;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public void setBorrowReason(String borrowReason) 
    {
        this.borrowReason = borrowReason;
    }

    public String getBorrowReason() 
    {
        return borrowReason;
    }
    public void setPlanBorrowDate(Date planBorrowDate) 
    {
        this.planBorrowDate = planBorrowDate;
    }

    public Date getPlanBorrowDate() 
    {
        return planBorrowDate;
    }
    public void setPlanBackDate(Date planBackDate) 
    {
        this.planBackDate = planBackDate;
    }

    public Date getPlanBackDate() 
    {
        return planBackDate;
    }
    public void setDelflag(Integer delflag) 
    {
        this.delflag = delflag;
    }

    public Integer getDelflag() 
    {
        return delflag;
    }
    public void setStatus(Integer status) 
    {
        this.status = status;
    }

    public Integer getStatus() 
    {
        return status;
    }

    public List<ArcBorrowDetails> getArcBorrowDetailsList()
    {
        return arcBorrowDetailsList;
    }

    public void setArcBorrowDetailsList(List<ArcBorrowDetails> arcBorrowDetailsList)
    {
        this.arcBorrowDetailsList = arcBorrowDetailsList;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("borrowId", getBorrowId())
            .append("borrowNumber", getBorrowNumber())
            .append("borrowUserId", getBorrowUserId())
            .append("userName", getUserName())
            .append("borrowReason", getBorrowReason())
            .append("planBorrowDate", getPlanBorrowDate())
            .append("planBackDate", getPlanBackDate())
            .append("updateTime", getUpdateTime())
            .append("delflag", getDelflag())
            .append("status", getStatus())
            .append("arcBorrowDetailsList", getArcBorrowDetailsList())
            .toString();
    }
}
